<script setup lang="ts">
import { darkTheme } from 'naive-ui';
import { useAppStore } from '@/stores';

const appStore = useAppStore();

watchEffect(() => {
  appStore.setThemeColor(appStore.primaryColor, appStore.isDark);
});
// const ipcHandle = () => window.electron.ipcRenderer.send('ping');
</script>

<template>
  <n-config-provider :theme="appStore.isDark ? darkTheme : undefined" :theme-overrides="appStore.naiveThemeOverrides">
    <RouterView />
  </n-config-provider>
</template>
